<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="b" uri="/bbs-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'blogMessageBoard.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" type="text/css" href="css/footer.css">
		<link rel="stylesheet" type="text/css" href="css/blog_header.css">
		<link rel="stylesheet" type="text/css" href="css/blog_top_head.css">
		<link rel="stylesheet" type="text/css"
			href="css/blog_center_right.css">
		<link rel="stylesheet" type="text/css" href="css/blogMessageBoard.css">
		<link rel="stylesheet" type="text/css" href="css/pageStyleOne.css">
		<script type="text/javascript" src="js/parseIcon.js">
</script>
		<script type="text/javascript" src="js/jquery.js">
</script>
		<script type="text/javascript">
function showEdit(id) {
	var s = ".enterMessage" + id
	$(s).css("display", "block");

}
function cancleWin(id) {
	var s = ".enterMessage" + id
	$(s).css("display", "none");
}
</script>
	</head>
	<body onload="parseIcon()">
		<div class="tbody">
			<%@ include file="styleJsp/blog_top_head.jsp"%>
			<div class="table">
				<%@ include file="styleJsp/blog_header.jsp"%>
				<div class="center">
					<div id="content">
						<div class="center_left_title">
							<b>留言板</b>
						</div>
						<div class="center_left_context">
							<div class="biaoqing">
								<a href="#"><img src="images/biaoqing.gif" /> </a>
							</div>
							<div class="messageBoardFrame" style="font-size: 12px;">
								<form action="publishMessageBoardAction?userId=${userId}"
									name="form1" method="post">
									<span class="messageBoardText"><b:editTable height="100"
											width="700" /> </span>
									<span class="messageBoardFrameBtn"><input type="image"
											src="images/liuyan.jpg" /> </span>
								</form>
							</div>
							<div class="center_left_context_line"></div>
							<s:iterator value="list">
								<div class="center_left_context_Msg">
									<div class="center_left_context_MsgText">
										<div class="center_left_context_ImgBG">
											<div class="center_left_context_Img">
												<div class="center_left_context_ImgStyle">
													<img alt="" src="images/people1.jpg"
														style="width: 111; height: 111px">
												</div>
											</div>
										</div>
										<div class="center_left_context_text">
											<div class="center_left_context_head">
												<span class="username"><a href="#"><s:property
															value="user.userName" /> </a> </span>
												<span class="dateTime"><s:property
														value="messageBoardDate.toString().substring(0,16)" /> </span>
												<span class="operationStyle"> <a
													onclick="showEdit(<s:property value='messageBoardId'/>)">回复</a>&nbsp;&nbsp;
													<a
													href="deleteMessageBoardAction_deleteFatherMessageBoard?messageBoardId=<s:property
															value="messageBoardId" />&userId=${userId}">删除
												</a> </span>
											</div>

											<div class="center_left_context_tx">
												<div class="center_left_context_context">
													<span class="center_left_context_context_word"><s:property
															value="messageBoardContent" /> </span>
												</div>
												<s:iterator value="messageBoards">
													<div class="center_left_context_sonContext">
														<div class="center_left_context_sonContextStyle">
															<div class="center_left_context_sonContextStyleImg">
																<img alt="" src="images/people1.jpg"
																	style="width: 40px; height: 40px;">
															</div>

															<div class="center_left_context_sonContextStyleCx">
																<div class="message">
																	<span class="name"><a href="#"><s:property
																				value="user.userName" /> </a> </span>
																	<span class="msg"><s:property
																			value="messageBoardContent" /> </span>
																</div>
																<div class="timeT">
																	<span class="time"><s:property
																			value="messageBoardDate.toString().substring(0,16)" />
																	</span>
																	<span class="delete"><a
																		href="deleteMessageBoardAction_deleteSonMessageBoard?messageBoardId=<s:property
															value="messageBoardId" />&userId=${userId}">删除</a>
																	</span>
																</div>
															</div>

														</div>

													</div>
												</s:iterator>
												<div
													class="enterMessage<s:property value='messageBoardId'/>"
													style="width: 411px; height: 155px; float: left; display: none; background: #E8F0F7;">
													<div
														style="width: 391px; height: 135px; background: white; margin: 10px 0 0 10px; display: inline; float: left;">
														<form
															action="replyMessageBoardAction?messageId=${messageBoardId}&userId=<s:property value='userId'/>"
															name="form1" method="post">
															<b:editTable height="100" width="391"
																classId="${messageBoardId}" />
															<p
																style="margin: 5px 0 0 0; float: left; display: inline;">
																<span style="float: left; diplay: inline"> <input
																		type="image" src="images/replay.jpg"
																		style="float: left; margin: 0 5px 0 0; display: inline" />
																	<a
																	onclick="cancleWin(<s:property value='messageBoardId'/>)"
																	style="background: url('images/cannel.jpg'); width: 68px; height: 23px; float: left; dispaly: inline"></a>
																</span>
															</p>
														</form>
													</div>
												</div>

											</div>
										</div>
									</div>
									<div class="center_left_context_MsgText_line"></div>
								</div>
							</s:iterator>
							<div class="page_style_box">
								${pagination}
							</div>
						</div>
					</div>
					<%@ include file="styleJsp/blog_center_right.jsp"%>
				</div>
				<%@ include file="styleJsp/footer.jsp"%>
			</div>
		</div>
	</body>
</html>
